﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.XtraEditors;

namespace WmsApp.StaticData
{
    public static class DistinctEntityBinder
    {
        public static void BindingComboBoxEdit(ComboBoxEdit combo,string table,string field)
        {
            var list = Factory.WmsServiceFactory.GetServiceClient().GetDistinctEntities(table,field);
            combo.Properties.Items.Clear();
            foreach (var item in list)
            {
                if (!String.IsNullOrEmpty(item.Field))
                {
                    combo.Properties.Items.Add(item.Field);
                }
            }
        }
    }
}
